<style>
	.tableoos thead th{line-height:32px;border:1px solid #EDEDED; font-weight:bolder;}
	.tableoos tbody td{border:1px solid #EDEDED; line-height:24px;}
</style>
<div class="pageContent">
    <div class="pageFormContent" layouth="56" style="height: 290px; overflow: auto;">
        <fieldset>
            <fieldset>
                <legend>发货信息</legend>
                <div>
                    <table class="tableoos" width="100%" align="center">
                        <tr align="center">
                            <th width="20%">快递单号码：</th>
                            <th><input type="text" MaxLength="125" size="50px" name="courier_number" id="courier_number"></th>
                            
                            <th width="15%"><input type="hidden" id="orderId" value="{$id}"><input rel="{$id}" type="button" value="发货" class="oosbnt"></th>
                        </tr>
                        <tbody>
                        </table>
                    </div>
                    </fieldset>
                </div>
            </div>
<script>
$(function(){
	
	$(".oosbnt").click(function(){
		$this=$(this);
		$this.attr('disabled','true');
		$rel=$("#orderId").val();
		$courier_number=$("#courier_number").val();
		if($courier_number != null){
			
			var param={id:$rel,courier_number:$courier_number};
			var url="{:U('Order/do_sipping')}";
			$.ajax({
				type:'POST',
				url:url,
				data:param,
				dataType:"json",
				cache: false,
				success:function(json){
					if(json.statusCode==200){
						alert(json.message);
					}else{
						$this.removeAttr('disabled');
						alert(json.message);
					}
				},
			});//ajax
		}else{
			$this.removeAttr('disabled');
			alert("请输入出库单号");
		}
	});//click
});
</script>